import React, { Component } from 'react';
import { Modal, Form, Input, Row, Col, InputNumber } from 'antd'

const FormItem = Form.Item;
const formItemLayout = {
  labelCol: {span: 6},
  wrapperCol: {span: 18 }
};
const formItemLayout1 = {
  labelCol: {span: 7},
  wrapperCol: {span: 17 }
};

class CheckInfoModal extends Component {




  render() {
    const { getFieldDecorator } = this.props.form
    const {modalVisible, ConsumerDetailItem } = this.props

    return (
      <Modal title="会员详情"
       width={350}
       onOk={this.handleOk}
       onCancel={this.props.onCancel}
       visible={modalVisible}
       footer={null}>
        <Form>
          <FormItem label="会员昵称"  {...formItemLayout}>
            {getFieldDecorator('name',{
              initialValue:ConsumerDetailItem && ConsumerDetailItem.name,
            })(
              <Input   placeholder="请输入会员昵称" />
            )}
          </FormItem>
          <FormItem label="注册时间"  {...formItemLayout}>
            {getFieldDecorator('createTime')(
             <span>{ConsumerDetailItem && ConsumerDetailItem.createTime}</span>
            )}
          </FormItem>
          <Row>
            <Col span={5} style={{marginLeft:'8px',paddingTop:'8px' ,color:'black'}}>账户余额 :</Col>
            <Col span={17}>
              <FormItem label="消费金"  {...formItemLayout1} style={{marginBottom:'10px'}}>
                {getFieldDecorator('money',{
                  initialValue:ConsumerDetailItem && ConsumerDetailItem.money,
                })(
                 <InputNumber/>
                )}
              </FormItem>
              <FormItem label="福利金"  {...formItemLayout1} style={{marginBottom:'10px'}}>
                {getFieldDecorator('welfareMoney',{
                   initialValue:ConsumerDetailItem && ConsumerDetailItem.welfareMoney,
                })(
                 <InputNumber/>
                )}
              </FormItem>
              <FormItem label="积分"  {...formItemLayout1} style={{marginBottom:'10px'}}>
                {getFieldDecorator('bonous',{
                   initialValue:ConsumerDetailItem && ConsumerDetailItem.bonous,
                })(
                 <InputNumber/>
                )}
              </FormItem>
              <FormItem label="礼券"  {...formItemLayout1} style={{marginBottom:'10px'}}>
                {getFieldDecorator('giftMoney',{
                   initialValue:ConsumerDetailItem && ConsumerDetailItem.giftMoney,
                })(
                 <InputNumber/>
                )}
              </FormItem>
            </Col>
          </Row>
        </Form>
      </Modal>
    );
  }
}

export default  Form.create()(CheckInfoModal) ;
